package org.power.core.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;

/**
 * @author 苗冬冬
 */
public class Client {

    /*public static void main(String[] args) throws IOException {
        String msg = "Client data";
        String host = "192.168.3.69";
        String host1 = "127.0.0.1";
        try {
            Socket socket = new Socket(host1, 52000);

            PrintWriter pw = new PrintWriter(socket.getOutputStream());
            pw.println(msg);
            System.out.println(msg);
            pw.flush();

            BufferedReader is = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            String line = is.readLine();
            System.out.println("received from server " + line);

            is.close();
            pw.close();
            socket.close();
        } catch (UnknownHostException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }*/
}
